home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 48 / Amiga Format CD48 (1999-12-13)(Future Publishing)(GB)(Track 1 of 2)[!][issue 2000-01].iso / -screenplay- / hd_installers / whd_installers / games_s-t / turrican.lha / Turrican / Install next >
Text File  |  1998-06-24  |  3KB  |  134 lines

  1. ;****************************
  2.  
  3. (set #readme-file "README")    ;name of readme file
  4. (set #cleanup "install.slave")    ;files to delete after install
  5.  
  6. ;****************************
  7.  
  8. ;----------------------------
  9. ; Checks if given program is reachable via the path
  10. ; if not abort install
  11. ; IN:  #program - to check
  12. ; OUT: -
  13.  
  14. (procedure P_chkrun
  15.   (if
  16.     (= 0 (run ("cd SYS:\nWhich %s" #program)))
  17.     ("")
  18.     (abort ("You must install \"%s\" first !\nIt must be accessible via the path.\nYou can find it in the whdload package." #program))
  19.   )
  20. )
  21.  
  22. ;****************************
  23.  
  24. (if
  25.   (exists #readme-file)
  26.   (if
  27.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  28.     ("")
  29.     (run ("SYS:Utilities/More %s" #readme-file))
  30.   )
  31. )
  32.  
  33. (set #program "WHDLoad")
  34. (P_chkrun)
  35.  
  36. (set #program "DIC")
  37. (P_chkrun)
  38.  
  39. (set @default-dest
  40.   (askdir
  41.     (prompt ("Where should \"%s\" installed ?\nA drawer \"%s\" will automatically created." @app-name @app-name))
  42.     (help @askdir-help)
  43.     (default "RAM:")
  44.     (disk)
  45.   )
  46. )
  47. (set #dest (tackon @default-dest @app-name))
  48. (if
  49.   (exists #dest)
  50.   (
  51.     (set #choice
  52.       (askbool
  53.         (prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted ?" #dest))
  54.         (default 1)
  55.         (choices "Delete" "Skip")
  56.         (help @askbool-help)
  57.       )
  58.     )
  59.     (if
  60.       (= #choice 1)
  61.       (run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
  62.     )
  63.   )
  64. )
  65. (makedir #dest
  66.   (help @makedir-help)
  67.   (infos)
  68. )
  69.  
  70. ;----------------------------
  71.  
  72. (makedir 
  73.   (tackon #dest "data")
  74.   (help @makedir-help)
  75. )
  76.  
  77. (copyfiles
  78.   (help @copyfiles-help)
  79.   (source ("%s.slave" @app-name))
  80.   (dest #dest)
  81. )
  82. (copyfiles
  83.   (help @copyfiles-help)
  84.   (source "install.slave")
  85.   (dest #dest)
  86. )
  87. (copyfiles
  88.   (help @copyfiles-help)
  89.   (source ("%s.inf" @app-name ))
  90.   (newname ("%s.info" @app-name ))
  91.   (dest #dest)
  92. )
  93. (if
  94.   (exists #readme-file)
  95.   (copyfiles
  96.     (help @copyfiles-help)
  97.     (source #readme-file)
  98.     (dest #dest)
  99.   )
  100. )
  101.  
  102. (select
  103.   (askchoice
  104.     (prompt "Which version of Turrican do you have ?")
  105.     (choices "Rainbow Arts / Innerprise" "AmigaFun")
  106.     (help @askchoice-help)
  107.   )
  108.   (
  109.     (run ("cd \"%s\"\nwhdload install.slave WriteDelay=50" #dest))
  110.     (if
  111.        (exists (tackon #dest "data/70"))
  112.        ("")
  113.        (abort "The Install was unable to create all nesseccary files !")
  114.     )
  115.   )
  116.   (
  117.     (message "\nInsert your \"Turrican\" Disk into drive DF0: !\n\n(make sure it's the right disk because it will not checked)")
  118.     (if
  119.       (= 0
  120.         (run ("cd \"%s/data\"\nDIC DF0: FD=1 LD=1 >CON:///1000//CLOSE" #dest))
  121.       )
  122.       ("")
  123.       (abort "\"DIC\" has failed to create a diskimage")
  124.     )
  125.   )
  126. )
  127.  
  128. ;----------------------------
  129.  
  130. (run ("cd %s\nDelete %s ALL QUIET FORCE" #dest #cleanup))
  131.  
  132. (exit)
  133.  
  134.